package net.disy.cadenza.repository.wrappers;

import java.util.HashMap;
import java.util.Map;

public class DefaultConditionValue {
	private Map<String, String> attributeValues = new HashMap<String, String>();
	private String mainAttributeName;
	private boolean enabled = false;
	
	public void addAttributeValue(String attributeName, String value){
		attributeValues.put(attributeName, value);
	}

	public Map<String, String> getAttributeValues() {
		return attributeValues;
	}

	public boolean equalTo(DefaultConditionValue defaultConditionValue){
		return attributeValues.equals(defaultConditionValue.getAttributeValues());
	}

	public String getMainAttributeName() {
		return mainAttributeName;
	}
	public String getMainAttributeValue() {
		return attributeValues.get(mainAttributeName);
	}

	public void setMainAttributeName(String mainAttributeName) {
		this.mainAttributeName = mainAttributeName;
	}
	
	public boolean isEnabled() {
		return enabled;
	}

	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}

	public String toString(){
		return attributeValues.toString();
	}
}
